{% extends "base.html" %}
{% block add_links %}
<link href="/static/admin/showPosts.css" rel="stylesheet">
{% endblock %}
{% block block_body %}
	<table class="table table-bordered">
		<tr>
			<th>Тема записи</th>
			<th>Дата создания</th>
			<th></th>
			<th></th>
		</tr>
	{% for post in posts %}
		<tr>
			<td><a href="{{ post['post_url'] }}">{{ post['title'] }}</a></td>
			<td>{{ post['date'] }} </td>
			<td class="edit-link"><a class="btn btn-default _modal ajax disabled" href="{{ post['edit_url'] }}" method="post">Редактировать</a></td>
			<td class="delete-link"><a class="btn btn-default silent ajax disabled" href="{{ post['delete_url'] }}" method="post">Удалить</a></td>
		</tr>
	{% endfor %}
	</table>
<a class="btn btn-primary _modal ajax disabled" href="/admin/posts/add-post" role="button" data-target="#myModal" data-toggle="modal">Добавить запись</a>

{% endblock %}